<template>
	<view ref="player"></view>
</template>

<script>
    import {yyEva} from '../../static/js/yyeva'
    export default {
        name: "yyeva",
	    
	    mounted() {
		    const that=this
            yyEva({
                container:this.$refs.player.$el,
                // videoUrl: "http://ybxiangqin.yyyybbbb.com/yy.mp4",
                // videoUrl:"/live/yy.mp4",
                videoUrl:require('../../static/yy.mp4'),
                // require('../../static/yy.mp4'),


                // alphaDirection: 'right',
                // mode: 'Fill',
                // useMetaData: true,
                // loop: true,
                // useFrameCache: true,
                // mute: false,
                // useVideoDBCache: true,
                // forceBlob: false,
                // showVideo: false,
                // showPlayerInfo: true,
                // useAccurate: true,
                // logLevel: 'info',
                // renderType: 'webgl',
             
                onStart(){
                    console.log("yyEva:","onStart------->")
                },
                onStop(){
                    console.log("yyEva:","onStop------->")
                },
                onEnd(){
                    console.log("yyEva:","onEnd------->")
                },
                onPause(){
                    console.log("yyEva:","onPause------->")
                },
                onResume(){
                    console.log("yyEva:","onResume------->")
                },
                onProcess(){
                    console.log("yyEva:","onProcess------->")
                },
                onError(){
                    console.log("yyEva:","onError------->")
                },
            }).then(player => {
                // console.log("yyEva:",res)
                player.start()
	            that.player=player
            })
            
            //
            // this.player:YYEvaType = await
            // player.start() // start player
            // player.stop() // pause player
            // player.destory() // dstory player

        },
	    beforeDestroy() {
            this.player.destroy()
        }

    }
    
</script>

<style scoped>

</style>
